from pathlib import Path

import pandas as pd
df = pd.read_excel(Path(r'data/train_dataset_and_mark/Traning_Dataset.xlsx'))
df = df.drop(columns=['ID','Patient Age','Patient Sex','Left-Fundus','Right-Fundus','Left-Diagnostic Keywords','Right-Diagnostic Keywords'])

# 统计每一列为1的数量
count_of_ones = df.eq(1).sum()
total_count = count_of_ones.sum()
proportion = count_of_ones / total_count
print(count_of_ones)
print(proportion)
# [0.328039,0.151603,0.062085,0.060930,0.046491,0.022235,0.050245,0.278371]